<?php

// +----------------------------------------------------------------------
// | EasyAdmin
// +----------------------------------------------------------------------
// | PHP交流群: 763822524
// +----------------------------------------------------------------------
// | 开源协议  https://mit-license.org 
// +----------------------------------------------------------------------
// | github开源项目：https://github.com/zhongshaofa/EasyAdmin
// +----------------------------------------------------------------------

namespace app\model\api;

use laytp\BaseModel;
use think\model\concern\SoftDelete;

class GenshinCollect extends BaseModel
{
    use SoftDelete;
    /**
     * 收藏列表
     * @param $openid
     * @return mixed
     */
    public function getCollect($openid){
        if(empty($openid)){
            return [];
        }
        $list = $this->where([
            ['openid', '=', $openid],
        ])
            ->order('team_id desc')
            ->cache('genshin_collect'.$openid,0)
            ->column('team_id');

        return $list;
    }

}